using System;
using System.ComponentModel.DataAnnotations;

namespace Eqwww.Web.Areas.SystemManage.Models.MyAccount
{
    public class ChangePasswordModel
    {
        [Required(ErrorMessage="当前密码不能为空")]
        [DataType(DataType.Password)]
        [Display(Name = "当前密码")]
        public string OldPassword { get; set; }

        [Required(ErrorMessage="新密码不能为空")]
        [StringLength(100, ErrorMessage = "{0} 长度必须在 {2} - {1} 之间", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "新密码")]
        public string NewPassword { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "新密码")]
        [Compare("NewPassword", ErrorMessage = "两次输入密码不一致")]
        public string ConfirmPassword { get; set; }
    }
}